#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>
int main()
{
	int n = 0, m = 0;
	scanf("%d %d", &n, &m);
	int bits = n ^ m;
	int count = 0;
	int i = 32;
	for (i = 32; i >= 1; i--)
	{
		int a = bits & 1;
		bits = bits >> 1;
		if (1 == a)
		{
			count++;
		}
	}

	printf("%d", count);
	return 0;
}